{include file="Index/header" /}
 
    <form action="{:url('Advert/add')}" method="post" /> 
	    <input type="hidden" name="sbt" value="1">
	    <input type="hidden" name="aid" value="{$aid}">
    	<div class="formbody">
    		<div class="formtitle"><span>广告位添加</span></div>
		    <ul class="forminfo">
		     	
			    <li>
			    	<label>分类</label>
			    	<select name="code" class="form-select">
			    		{volist name="catagoryArr" id="vo" key="k" } 
						<option {if $k==$AdvertInfo[code]} selected {/if} value="{$key}">{$vo}</option>
						{/volist}
			    	</select>
			    </li>
			    <li>
			    	<label>标题</label>
			    	<input name="title" type="text" class="dfinput" value="{$AdvertInfo.title}" size="80"/>
			    </li> 
			     <li>
			    	<label>跳转地址</label>
			    	<input name="url" type="text" class="dfinput" value="{$AdvertInfo.url}" size="80"/>
			    </li> 
			    
			    <li>
			    	<label>图片</label>
			    	<div style="float:left;margin-bottom:10px;">
			    	  <input name="path" id="img1" type="text" readonly class="dfinput" value="{$AdvertInfo.path}" size="80"/>
			    	  
			    	 </div>
			    	<label class="config-upload">
								上传<input style="width:0px;" accept="image/*" name="img" id="uploadFile1" onchange="uploadImg(1);" type="file">
					</label>
					<div class="config-upload">
						<a href="javascript:void(0);" onclick="showPic(1);">预览</a>
					</div>
			    </li>
			    
			    
			    <li>
			    	<label>&nbsp;</label>
			   		 <input name="sbt" type="submit" class="btn" value="确认保存"/>
			   	</li>
		    </ul>
    	</div>
	</form>
<script>
function uploadCall(obj,path){
	 $("#img"+obj).val(path);
}
//预览
function showPic(obj){
	art.dialog.open($("#showPic").val()+'?pic='+$("#img"+obj).val(),{title:'图片预览'});
}

</script>

{include file="Index/footer" /}